<template>
  <div>
    <el-row>
      <el-button type="primary">添加</el-button>
    </el-row>
    <el-table :data="tableData" border size="30px" style="width: 100%">
      <el-table-column prop="id" label="id" min-width="80"> </el-table-column>
      <el-table-column label="图片" min-width="130">
        <template slot-scope="scope">
          <img :src="scope.row.url" alt="" />
        </template>
      </el-table-column>
      <el-table-column prop="title" label="名称" min-width="180">
      </el-table-column>
      <el-table-column prop="price" label="价格" min-width="180">
      </el-table-column>
      <el-table-column label="操作" min-width="180">
        <el-row>
          <el-button type="success" >修改</el-button>
          <el-button type="danger"  >删除</el-button>
        </el-row>
      </el-table-column>
    </el-table>

  </div>
</template>

<script>
import { jingxuanData } from "@/api";
export default {
  data() {
    return {
      tableData: [],
      fit: "",
    };
  },
  async created() {
    const { data } = await jingxuanData();
    this.tableData = data.result;
    console.log(this.tableData);
  },
  methods: {
  },
};

</script>

<style lang="less" scoped>
.el-table {
  margin-top: 20px;
  opacity: 1;
}
.cell {
  img {
    width: 50px;
    height: 50px;
  }
}
</style>
